package com.silverbox.waimai.dubboApi.member;

import com.silverbox.core.annotation.DataSource;
import com.silverbox.core.result.CoreResponse;
import com.silverbox.shopper.dubboApi.info.ShopperInfoServiceApi;
import com.silverbox.waimai.dubboApi.member.MemberServiceApi;
import com.silverbox.waimai.entity.ReceiverAddress;
import com.silverbox.waimai.entity.TakeOutConfig;
import com.silverbox.waimai.service.member.MemberService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <pre>
 * 功    能:
 * 涉及版本:
 * 创 建 者: YangYangjun
 * 日    期: 2020-03-07 10:37
 * </pre>
 */
@Service
@DataSource(name = DataSource.DATASOURCE_B)
public class MemberServiceApiImpl implements MemberServiceApi {

    @Autowired
    private MemberService memberService;

    @Override
    public CoreResponse<Object> addOrUpdateReceiverAddress(ReceiverAddress receiverAddress) {
        return memberService.addOrUpdateReceiverAddress(receiverAddress);
    }

    @Override
    public CoreResponse<Object> deleteReceiverAddress(Integer addressId) {
        return memberService.deleteReceiverAddress(addressId);
    }

    @Override
    public CoreResponse<Object> findReceiverAddressList(String buyerId, Integer pageNo, Integer pageSize, Double maxTakeOutDistance, Double shopLng, Double shopLat) {
        return memberService.findReceiverAddressList(buyerId,pageNo,pageSize,maxTakeOutDistance,shopLat,shopLng);
    }

}
